<!--  -->
<template>
  <div class="app-container">
    <div class="formDiv">
      <el-form ref="form" :inline="true" :model="form" label-width="100px" :rules="rules" disabled>
        <el-row>
          <el-col :span="24">
            <el-form-item label="开户类型">
              <el-radio-group v-model="form.bank_type">
                <el-radio :label="1">对公账户</el-radio>
                <el-radio :label="2">对私账户</el-radio>
              </el-radio-group>
            </el-form-item>
          </el-col>
          <el-col :span="24">
            <el-form-item label="提现金额">
              <el-input v-model="form.money" clearable />
            </el-form-item>
          </el-col>
          <el-col :span="24">
            <el-form-item label="提现银行卡">
              <el-input v-model="form.bank_number" clearable />
            </el-form-item>
            <!-- <el-form-item label="提现银行卡">
              <el-select v-model="form.bank_id" placeholder="请选择" clearable>
                <el-option
                  v-for="item in bankCardList"
                  :key="item.value"
                  :label="item.name"
                  :value="item.value"
                />
              </el-select>
            </el-form-item>-->
          </el-col>
          <el-col :span="24">
            <el-form-item label="提现银行">
              <el-input v-model="form.bank_name" clearable />
            </el-form-item>
          </el-col>
          <el-col :span="24">
            <el-form-item label="户名">
              <el-input v-model="form.bank_user_name" clearable />
            </el-form-item>
          </el-col>
          <el-col :span="24">
            <el-form-item label="提现说明" prop="remark">
              <el-input type="textarea" v-model="form.remark" :rows="4" />
            </el-form-item>
          </el-col>
        </el-row>
      </el-form>
    </div>
  </div>
</template>

<script>
import { cashShow } from "@/api/cashOut";
export default {
  name: "tixianDetail",
  data() {
    return {
      form: {
        bank_type: "",
        org_phone: "",
        money: "",
        bank_id: "",
        bank_number: "",
        remark: "",
      },
      bankCardList: [],
      rules: {},
      type: "",
    };
  },

  components: {},

  mounted() {
    this.type = this.$route.query.type;
    if (this.type == "detail") {
      this.$route.meta.title = "查看详情";
      this.getDetails(this.$route.query.id);
      // this.isDisabled = true;
    }
  },

  methods: {
    async getDetails(id) {
      let data = { id };
      let res = await cashShow(data);
      if (res.data.status == 0) {
        let resData = res.data.data;
        this.form = resData;
      } else {
        this.errorStatus(res.data.message);
      }
    },
    // 失败状态弹窗
    errorStatus(txt) {
      this.eleMsg(txt, "error");
    },
    // 成功状态弹窗
    warnStatus(txt, status) {
      this.eleMsg(txt, status);
    },
    // 弹窗组件
    eleMsg(txt, status) {
      this.$message({
        showClose: true,
        message: txt,
        type: status,
      });
    },
  },
};
</script>
<style  scoped>
</style>